<template>
  <div style="height:100%">
    <Chart :cdata="cdata" />
  </div>
</template>

<script>
import Chart from './chart.vue'
export default {
  data () {
    return {
      cdata: {}
    };
  },
  components: {
    Chart,
  },
  props: {
    info: {
      type: Object
    }
  },
  watch: {
    info: {
      handler (newVal) {
        if (newVal) {
          this.cdata = {
            seriesData: [
              { value: newVal.yes, name: "一肩挑" },
              { value: newVal.no, name: "非一肩挑" },
            ]
          }
        }
      },
      immediate: true,
      deep: true
    }
  },
  mounted () {
  },
  methods: {
  }
};
</script>

<style lang="scss" scoped>
</style>